Team - VenueForge - Phase1 MVP#76
Open
akhintheruvath wants to merge 128 commits into
Open
Conversation
getting started - basic frontend setup
tailwind css setup
initial backend setup
feat(backend): add public venue & category read APIs
Navbar basic with Location
File Re-Organisied
Added Venue Owner, Admin Pages
Established API Data To Load On Frontend
…into phase1mvp-akhin
Completed The Full UI/UX Design For Owner Page
Replace the separate Add Venue form with a create-draft-then-edit flow: "Add Venue" now creates an empty DRAFT and redirects to the edit page, which autosaves field changes (debounced ~2s) with a saving/saved indicator and a "Continue Editing Later" action. Backend: - Implement venueOwnerCreateVenue (empty DRAFT) and venueOwnerUpdateVenue (partial autosave, validators skipped — submit is the validation gate) - Add GET /venueOwner/venues/:id (venueOwnerGetVenueById) for fetching an owner's own venue in any status - Replace VENUE_OWNER_VENUE_PROJECTION with OWNER_HIDDEN_FIELDS exclusion Frontend: - Remove AddVenuePage; VenueForm handles both create and edit - Rename owner service fns (getOwnerVenues -> getVenueOwnerVenues, etc.) and add createDraftVenue / getVenueOwnerVenueById
Implement venueOwnerSubmitVenue: verify ownership, gate on SUBMITTABLE_STATUSES, then check all REQUIRED_VENUE_FIELDS are filled before moving DRAFT -> PENDING or EDIT_DRAFT -> CHANGES_PENDING. Returns 400 with missingFields when the draft is incomplete. Add REQUIRED_VENUE_FIELDS and missingRequiredVenueFields() to shared.js. Preserve the structured error body on the API client so callers can read response data, and surface missingFields inline in VenueForm by flagging each input and focusing the first. Show a confirmation toast on submit.
venue add, edit & submit flow - venue owner page
Admin Page : Sidebar and Venue approval page added
Replace the 501 stub in venueOwnerDeleteVenue with a real hard delete gated to DRAFT and EDIT_DRAFT statuses. Add a DELETABLE_STATUSES constant and a shared statusNotAllowedMessage() helper so the guard and its 400 message share one source of truth across submit/delete/edit actions. Frontend: hide the delete button unless the venue is DRAFT/EDIT_DRAFT, tailor the confirm dialog and success toast for discard-edit vs delete, and drop the alert() now that the api client surfaces errors as toasts.
…lers Replace the hardcoded status-gate 400 messages in venueOwnerSubmitVenue and venueOwnerUpdateVenue with statusNotAllowedMessage(), so the allowed status list and its error text stay in sync with the guards.
delete draft venue
Editing a live APPROVED venue never mutates it in place. Instead it works on an EDIT_DRAFT copy (editOf -> original), which is submitted as CHANGES_PENDING for admin re-approval. Backend: - Add POST /venueOwner/getVenueForEdit/:id — idempotently creates/resumes the EDIT_DRAFT copy, 409s when a CHANGES_PENDING copy is already in review - Add buildEditDraftSeed() in shared to seed a copy from the original - Mark APPROVED venues in the owner list with editStatus so the UI can relabel/guard the Edit button without a per-row request Frontend: - getVenueForEdit() service call - EditVenuePage resolves the editable copy for APPROVED venues, autosaves and submits against the copy id while keeping the original id in the URL, and shows a blocked state on 409 - VenueTable shows "Resume edit" for in-progress copies and disables Edit with an info tooltip while edits await review
- Replace placeholder admin login with real auth (form + /auth/login) - Guard admin routes with RequireAuth (role: admin) - Wire up admin logout via auth context - Add seedAdmin script to create an admin user
venue owner side and admin side updates
Backend: - GET /admin/venues — paginated review queue filtered by review status (PENDING = new venues, CHANGES_PENDING = submitted edits), sorted by submission time; supports countOnly for tab badges - Mount /api/admin behind authenticate + requireRole(ADMIN) - Add REVIEW_STATUSES and HISTORY_ACTIONS constants - Add version counter and editHistory audit log to the venue model Frontend: - Replace mock AdminVenueApprovals data with live API calls - Two tabs (New Venues / Venue Edits) with count badges, URL-persisted active tab and sort direction, and pagination - Add admin.service.js (getAdminVenues, getAdminVenuesCount)
feat: add admin venue review queue
Add GET /admin/venues/:id returning a single venue in a review status (PENDING or CHANGES_PENDING); non-review statuses are treated as not found. The response includes owner contact fields and, for edit copies, `editOf` linking to the live listing. Replace the hardcoded mock data in AdminVenueDetails with a fetch from the new endpoint, including loading/error states and a "View live venue details" link for CHANGES_PENDING edit copies.
feat: add admin venue detail endpoint and wire up review page
Add an Amenity collection and expose GET /amenities for the frontend. Wire amenities into the venue schema as an array of refs, make it a required editable field, and populate amenity labels on every venue read via a new VENUE_POPULATE spec. Render a multiselect checkbox grid in VenueForm to set and pre-check a venue's amenities.
feat: add venue amenities with multiselect in venue form
Added Amentities and Categories in Admin Side
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase Category
Tech Stack (For Phase 1 MVP Submissions)
Checklist:
AI Disclosure